<html>
<span id="li1">jack</span><span id="li2">rose</span><span id="li3">lucy</span>
<script type="text/javascript">
window.onload=function(){
	var node = document.getElementById("li2");
	var a1 = node.previousSibling;
	var a2 = node.nextSibling;
	console.log(a1.id + a1.innerText);
	console.log(a2.id + a2.innerText);
};










</script>
</html>







